<?xml version="1.0" encoding="utf-8" ?>
<!--

//***************************************************************************
// ***** Script Header *****
//
// Solution:  Solution Accelerator for Business Desktop Deployment
// File:      _template_ENU.xml
//
// Purpose:   Wizard TEMPLATE
//
// Microsoft Solution Version:  2.6.0
// Microsoft Script Version:    2.6.0
// Customer Build Version:      1.0.0
// Customer Script Version:     1.0.0
//
// Microsoft History:
// 2.6.0    KeithGa  03/14/2006  New Template Version!
//
// Customer History:
//
// ***** End Header *****
//***************************************************************************

-->
<Wizard>
  <Global>

      <Initialization>ZTINicUtility.vbs</Initialization>

      <CustomStatement>
        <![CDATA[ 
        
        document.title =  "Deployment Wizard" 
        window.resizeTo 700,500 
        
        CleanNetworkSettings 0       
        
        Function InitializeNetworkDialog        
            Dim oItem
            Dim oOption
            
            
            For Each oItem in ObjNetworkAdapters
                Set oOption = document.createElement("OPTION")
                oOption.Value = oItem.MACAddress
                oOption.Text  = oItem.Description
                OSDAdapter0MacAddress.Add oOption
            Next 
            
            if OSDAdapter0MacAddress.Options.Length = 1 then
                OSDAdapter0MacAddress.Options(0).Selected = true
                OSDAdapter0MacAddDisplay.value = OSDAdapter0MacAddress.Options(0).value
            end if
        End Function 
        
        Function ValidateNetworkDialog
        
            Dim sErrorMsg
            Dim oItem
            
            if OSDAdapter0MacAddress.Value <> "" then
                oEnvironment.Item("OSDAdapter0MacAddress" ) = OSDAdapter0MacAddress.Value
            end if          
            if OSDAdapter0IPAddressList.Value <> "" then
                oEnvironment.Item("OSDAdapter0IPAddressList" ) = OSDAdapter0IPAddressList.Value
            end if          
            if OSDAdapter0SubnetMask.Value <> "" then
                oEnvironment.Item("OSDAdapter0SubnetMask" ) = OSDAdapter0SubnetMask.Value
            end if          
            if OSDAdapter0Gateways.Value <> "" then
                oEnvironment.Item("OSDAdapter0Gateways" ) = OSDAdapter0Gateways.Value
            end if          
            if OSDAdapter0DNSServerList.Value <> "" then
                oEnvironment.Item("OSDAdapter0DNSServerList" ) = OSDAdapter0DNSServerList.Value
            end if          
            if OSDAdapter0DNSSuffix.Value <> "" then
                oEnvironment.Item("OSDAdapter0DNSSuffix" ) = OSDAdapter0DNSSuffix.Value
            end if          
            if OSDAdapter0WINSServerList.Value <> "" then
                oEnvironment.Item("OSDAdapter0WINSServerList" ) = OSDAdapter0WINSServerList.Value
            end if          
            
            oEnvironment.Item("OSDAdapterCount") = 1

            For each oItem in ObjNetworkAdapters
            
               if oItem.MACAddress = OSDAdapter0MacAddress.Value then
                   sErrorMsg = LoadNetworkAdapterSettings ( oItem, 0 )                 
                   exit for               
               end if            
               
            Next
            
            if sErrorMsg <> "" then
               Dim sNicMessage
               sNicMessage = "Network settings have been applied except for the following:" & vbNewLine & vbNewLine
               sNicMessage = sNicMessage & sErrorMsg & vbNewLine & vbNewLine & "OK to Continue?"
               if MsgBox (sNicMessage, vbYesNo, "Networking Settings Error" ) <> vbYes then
                   ValidateNetworkDialog = FALSE
                   exit function 
               end if
            end if
            
            ' We are done. Settings have been saved. Hard Exit!
            window.close

        end function 
        
        
        ]]>
    </CustomStatement>

</Global>

<!-- ************************************************************** -->

<Pane id="Ready">

    <Initialization><![CDATA[ InitializeNetworkDialog ]]> </Initialization>
    <Validation><![CDATA[ ValidateNetworkDialog ]]> </Validation>
    <Body>
      <![CDATA[
          
           <H1>Configure Static IP Network Settings<H1>
           
           <!-- <p>Select a network Interface to specify network settings.</p> -->
           
           <table width=90%>
              <tr>
                <td colspan=2 width=30%><label class=Larger >Network Interface:</Label></td>
                <td>
                    <select size=4 Name=OSDAdapter0MacAddress id=OSDAdapter0MacAddress onchange="javascript:OSDAdapter0MacAddDisplay.value=this.value;">
                    </select></br> <label class=ErrMsg for=OSDAdapter0MacAddress>* Required (SELECT ONE)</label> &nbsp;
                </td>
              </tr>
           </table>
           
           <table width=95%>
              <tr>
                <td width=5px></td>
                <td width=30%>Physical (MAC) Address:</td>  
                <td width=5px></td>
                <td>
                  <input disabled type=text id=OSDAdapter0MacAddDisplay name="OSDAdapter0MacAddDisplay" size=35 value="" />
                </td>
              </tr>

              <tr>
                <td></td>
                <td>IP Address(es): </td>
                <td>*</td>
                <td>
                  <input type=text id=OSDAdapter0IPAddressList name="OSDAdapter0IPAddressList" size=35 />
                  <label class=ErrMsg for=OSDAdapter0IPAddressList>* Required (MISSING)</label>
                </td>
              </tr>

              <tr>
                <td></td>
                <td>Subnet Mask(s): </td>
                <td>*</td>
                <td>
                  <input type=text id=OSDAdapter0SubnetMask name="OSDAdapter0SubnetMask" size=35 />
                  <label class=ErrMsg for=OSDAdapter0SubnetMask>* Required (MISSING)</label>
                </td>
              </tr>

              <tr>
                <td></td>
                <td>Default Gateway(s):</td>
                <td>*</td>
                <td>
                  <input type=text id=OSDAdapter0Gateways name="OSDAdapter0Gateways" size=35 />
                </td>
              </tr>
              
              <tr>
                <td></td>
                <td width=35%>DNS Server(s):</td>
                <td>*</td>
                <td>
                  <input type=text id=OSDAdapter0DNSServerList name="OSDAdapter0DNSServerList" size=35  />
                </td>
              </tr>

              <tr>
                <td></td>
                <td>DNS Suffixes:</td>
                <td></td>
                <td>
                  <input type=text id=OSDAdapter0DNSSuffix name="OSDAdapter0DNSSuffix" size=35 value="" />
                </td>
              </tr>

              <tr>
                <td></td>
                <td>WINS Server(s):</td>
                <td>*</td>
                <td>
                  <input type=text id=OSDAdapter0WINSServerList name="OSDAdapter0WINSServerList" size=35  /> 
                </td>
              </tr>
              
           </table>
           
           <input type=hidden name="OSDAdapterCount" value="1" />
               
           <p>If no settings are specified for an interface, DHCP will be used.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
           * = Comma-Delimited Addresses</p>

        ]]>
      
    </Body>

  </Pane>
  
</Wizard>
